import { AddFormatFunc, calcRuleType } from "../types";

AddFormatFunc<calcRuleType>({

	type: "CALC",

	handle: (rule, FMC) => {
		return `${rule[1][0] === "CALC" ? `(${FMC(rule[1])})` : FMC(rule[1])}${rule[2].map(item => FMC(item)).join("")}`;
	},

})
